Take a look at the Redbook "Lotus Instant Messaging/Web Conferencing (Sametime): Building Sametime Enabled Applications" specifically chapter 6.
http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg247037.html?Open
Carl
http://www.instant-tech.com
PS is this Heather Smith from the UK?